package org.ytor.core.sysapi.user.model;

import lombok.Data;
import lombok.EqualsAndHashCode;
import org.ytor.common.util.bean.Beans;
import org.ytor.core.sqlflow.PersistenceModel;
import org.ytor.core.sqlflow.anno.Table;
import org.ytor.core.sysapi.user.resp.SysUserDepartResp;

/**
 * created by yangtong on 2025/4/8 14:09:51
 * <br/>
 * 用户-部门关系
 */
@Data
@Table("sys_user_depart")
@EqualsAndHashCode(callSuper = true)
public class SysUserDepart extends PersistenceModel<SysUserDepart, String> {
    /**
     * 用户id
     */
    private String userId;

    /**
     * 部门id
     */
    private String departId;

    @Override
    public SysUserDepartResp toResp() {
        return Beans.copyProperties(this, SysUserDepartResp.class);
    }
}
